package zuoye2;
class Circle{
    private double bj;
    private final double PI=3.1415926;
    public Circle(){
        bj=1.0;
    }
    public void setBj(double bj) {
        this.bj = bj;
    }
    public double getBj() {
        return bj;
    }
    public void mj(){
        double mj;
        mj=PI*bj*bj;
        System.out.println("面积为"+mj);
    }
    public void zc(){
        double zc;
        zc=2*PI*bj;
        System.out.println("周长为"+zc);
    }
}
public class zuoye2 {
    public static void main(String[] args) {
        Circle ci = new Circle();
        System.out.println(ci.getBj());
        ci.setBj(2.0);
        System.out.println(ci.getBj());
        ci.mj();
        ci.zc();
    }
}
